#pragma once

#include "Types.h"
#include "Debug.h"
#include <NxPhysics.h>

#include <cmath>
#include <vector>
#include <algorithm>
#include <limits>

#define EPSILON 0.00000000001

using namespace irr;
using namespace core;
using namespace std;

vector3df getStringVector(char *str);

char	*strtrim(char *str, const char *trim);
char	*strltrim(char *str, const char *trim);
char	*strrtrim(char *str, const char *trim);

core::vector3df getYXangle(core::vector3df r);
core::vector3df getRelativePosition(core::vector3df origin, core::vector3df rotation, core::vector3df target);
f32 largest_root_of_quadratic_equation(f32 A, f32 B, f32 C);

static __inline bool isnan(double value);
static __inline bool isinf(double value);

vector<double> rootsOf(double A, double B, double C, double D, double E);
bool does_not_contain(vector<double> vector, double value);
void keysort(vector<double>& keys, vector<double>& items);